<ion-header>
    <ion-navbar no-border-bottom>
        <ion-title>报告查询</ion-title>
        <!-- <ion-buttons><button ion-button (click)="cancel()" >关闭</button></ion-buttons> -->
        <ion-buttons><button ion-button (click)="close()">关闭</button></ion-buttons>
    </ion-navbar>
</ion-header>
<ion-content>
    <ion-list class="gfoa-list">
        <ion-item>
            <ion-label>标题/关键字:</ion-label>
            <ion-input [(ngModel)]="queryCondition.keyWord"  placeholder="请输入标题或关键字"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label>报告作者:</ion-label>
            <ion-input [(ngModel)]="queryCondition.authornames" placeholder="请输入作者名称"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label>相关证券:</ion-label>
            <ion-input [(ngModel)]="queryCondition.bond" placeholder="请输入相关证券"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label>相关行业:</ion-label>
            <ion-select [(ngModel)]="queryCondition.industry" [selectOptions]="industryAlertOpts" cancelText="取消" okText="确定">
                <ion-option *ngFor="let industry of industryModel" value="{{industry.name}}">{{industry.name}}</ion-option>
            </ion-select>
        </ion-item>
        <ion-item>
            <ion-label>报告类型:</ion-label>
            <ion-select [(ngModel)]="queryCondition.reportType" [selectOptions]="reportTypeAlertOpts" cancelText="取消" okText="确定" >
                <ion-option *ngFor="let report of reportTypeModel" value="{{report.name}}">{{report.name}}</ion-option>
            </ion-select>
        </ion-item>
        <ion-item>
            <ion-label>来源机构:</ion-label>
            <ion-select [(ngModel)]="queryCondition.brokername" [selectOptions]="brokernameAlertOpts" cancelText="取消" okText="确定">
                <ion-option *ngFor="let broker of brokernameModel" value="{{broker.name}}">{{broker.name}}</ion-option>
            </ion-select>
        </ion-item>
        <ion-item>
            <ion-label>起始日期:</ion-label>
            <ion-datetime displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" [(ngModel)]="queryCondition.startDate"
                    cancelText="取消" doneText="确定" max="{{maxDate}}"
                    (ionChange)="ionChange()">
            </ion-datetime>
        </ion-item>
        <ion-item>
            <ion-label>结束日期:</ion-label>
            <ion-datetime displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" [(ngModel)]="queryCondition.endDate"
                    cancelText="取消" doneText="确定" 
                    min="{{minEndDate}}" max="{{maxDate}}">
            </ion-datetime>
        </ion-item>
        <ion-item>
            <ion-row>
                <ion-col width-33 class='title'>行业评级:</ion-col>
                <ion-col text-rigth class='substance'>
                    <div>{{queryCondition.industryLevel}}</div>
                </ion-col>
                <ion-col width-20 class="operate" >
                    <button ion-button small (click)="industryLevel()">选择</button>
                </ion-col>
            </ion-row>
        </ion-item>
        <ion-item>
            <ion-row>
                <ion-col width-33 class='title'>股票评级:</ion-col>
                <ion-col text-rigth class='substance'>
                    <div>{{queryCondition.stockLevel}}</div>
                </ion-col>
                <ion-col width-20 class="operate" >
                    <button ion-button small (click)="stockLevel()">选择</button>
                </ion-col>
            </ion-row>
        </ion-item>
        <!-- <ion-item>
            <ion-row>
                <ion-col width-33 class='title'>行业评级:</ion-col>
                <ion-col>{{queryCondition.industryLevel}}</ion-col>
                <ion-col width-20><button ion-button small (click)="industryLevel()">选择</button></ion-col>
            </ion-row>
        </ion-item>
        <ion-item>
            <ion-row>
                <ion-col width-33 class='title'>股票评级:</ion-col>
                <ion-col>{{queryCondition.stockLevel}}</ion-col>
                <ion-col width-20><button ion-button small (click)="stockLevel()">选择</button></ion-col>
            </ion-row>
        </ion-item> -->
    </ion-list>
    <ion-row>
        <ion-col text-center>
            <button block ion-button><ion-icon class="searchIcon" name="search"></ion-icon>查询</button>
        </ion-col>
        <ion-col text-center>
            <button block ion-button (click)="save()"><ion-icon class="happyIcon" name="happy"></ion-icon>保存查询条件</button>
        </ion-col>
        <ion-col text-center>
            <button block ion-button (click)="clear()"><ion-icon class="trashIcon" name="trash"></ion-icon>清空</button>
        </ion-col>
    </ion-row>
</ion-content>